-- GENERATED SPELL FOR [Sunblade Dawn Priest] --


function spell0_25371(pUnit, Event) --@Holy Nova,Self--
pUnit:FullCastSpellOnTarget(46564,pUnit)
pUnit:RegisterEvent('Sorts_25371', 1500, 1)
end

function spell1_25371(pUnit, Event) --@Holyform,Self--
pUnit:FullCastSpellOnTarget(46565,pUnit)
pUnit:RegisterEvent('Sorts_25371', 589, 1)
end

function spell2_25371(pUnit, Event) --@Renew,Heal--
pUnit:FullCastSpellOnTarget(46563,pUnit)
pUnit:RegisterEvent('Sorts_25371', 15000, 1)
end

function Sorts_25371(pUnit, Event)
local choix_sorts_25371 = math.random(0, 2)
if choix_sorts_25371 == 0 then
pUnit:RegisterEvent('spell0_25371', 1, 1)
end
if choix_sorts_25371 == 1 then
pUnit:RegisterEvent('spell1_25371', 1, 1)
end
if choix_sorts_25371 == 2 then
pUnit:RegisterEvent('spell2_25371', 1, 1)
end
end

function mob25371_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_25371', math.random(1500, 3000), 1)
end

function mob25371_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob25371_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob25371_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(25371, 1, 'mob25371_Action')
RegisterUnitEvent(25371, 2, 'mob25371_Leave')
RegisterUnitEvent(25371, 3, 'mob25371_Kill')
RegisterUnitEvent(25371, 4, 'mob25371_Die')
